home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2201 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mn5.swip.net!usenet
  2. From: roland.bengtsson@mbox3.swipnet.se (Roland Bengtsson)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Something goofy with fscanf(%s) ??
  5. Date: 28 Jan 1996 18:43:04 GMT
  6. Organization: -
  7. Message-ID: <1065.6601T1139T1653@mbox3.swipnet.se>
  8. References: <4ee66r$ffk@vixen.cso.uiuc.edu>
  9. NNTP-Posting-Host: dialup101-102.swipnet.se
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12.  
  13.  >:   I read in the old datafiles with fscanf(%d %s) as the format is;
  14.  >:number text-string-no-spaces...
  15.  
  16.  >:4 http://altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=&q=%22babe004%22
  17.  >:3 http://altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=&q=
  18.  >:          babe004
  19.  
  20.  >:   Now what this says to me that when fscanf() hits the %22 in the string
  21.  >:it's somehow interpreted funny and thus the second line is read back in as
  22.  >:in the second line.
  23.  
  24. What about fgets() and then process the line with sscanf() or an own function?
  25. I suppose you have enough buffer for the line.
  26.  
  27. -- 
  28.                               \|/
  29. Thor 2.22 #1497               @ @
  30. +--------------------------oOO-(_)-OOo----------+
  31. | _ //       |                                  |
  32. | \X/        |Falkenberg, Westcoast of Sweden   |
  33. |A3000/10MB  |                                  |
  34. |280HD/28.8  |Please write where YOU live!      |
  35. |GVP Spectrum|                                  |
  36. |AFS Pro     |Amiga-Programmer in C             |
  37. +------------+----------------------------------+
  38.  
  39. --
  40.  
  41.